﻿Public Class ImageGenerator
    Public Shared Function GetSmallColorIcon(ByVal color As Color) As Bitmap
        Return GetColorIcon(16, 16, color)
    End Function
    Public Shared Function GetLargeColorIcon(ByVal color As Color) As Bitmap
        Return GetColorIcon(32, 32, color)
    End Function
    Private Shared Function GetColorIcon(ByVal Width As Integer, ByVal Height As Integer, ByVal color As Color) As Bitmap
        Dim bmp As New Bitmap(Width, Height)
        Dim g As Graphics = Graphics.FromImage(bmp)
        g.FillRectangle(New SolidBrush(color), New Rectangle(0, 0, Width, Height))
        g.Dispose()
        Return bmp
    End Function
End Class
